package com.hzsd.zengbanyi.biaodan_text.utils;

import android.content.Context;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.View;

import com.hzsd.zengbanyi.biaodan_text.bean.WorkDAO;

public class TextChange implements TextWatcher {
	private Context context;
	private String taskSceneId;
	private String extend_name;
	private String type;
	private View view;
	private WorkDAO workDAO;

	public TextChange(Context context, String taskSceneId,String extend_name,String type, View view) {
		this.context = context;
		this.taskSceneId = taskSceneId;
		this.extend_name = extend_name;
		this.type = type;
		this.view = view;
		workDAO = new WorkDAO(context);
	}

	@Override
	public void beforeTextChanged(CharSequence s, int start, int count,
			int after) {
		// TODO Auto-generated method stub

	}

	@Override
	public void onTextChanged(CharSequence s, int start, int before, int count) {
		// TODO Auto-generated method stub

	}

	@Override
	public void afterTextChanged(Editable s) {
		workDAO.updateTaskSceneMoreField(taskSceneId, s.toString(), extend_name,type);

	}

}
